package com.purchase.ml.entity.acc;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_user")
@ApiModel(value = "SysUser对象", description = "用户表")
public class SysUser implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value="主键id")
    private Long id;

    /**
     * 账号为邮箱；
     */
    @TableField(value = "acc")
    @ApiModelProperty(value="账号为邮箱；")
    private String acc;

    /**
     * 密码
     */
    @TableField(value = "pwd")
    @ApiModelProperty(value="密码")
    private String pwd;

    /**
     * 经销商ID
     */
    @TableField(value = "dealer_id")
    @ApiModelProperty(value="经销商ID")
    private Long dealerId;

    /**
     * 角色ID
     */
    @TableField(value = "role_type")
    @ApiModelProperty(value="角色ID")
    private Integer roleType;

    /**
     * 账号头像
     */
    @TableField(value = "head_url")
    @ApiModelProperty(value="账号头像")
    private String headUrl;

    /**
     * 名称
     */
    @TableField(value = "name")
    @ApiModelProperty(value="名称")
    private String name;

    /**
     * 邮箱
     */
    @TableField(value = "email")
    @ApiModelProperty(value="邮箱")
    private String email;

    /**
     * 盐
     */
    @TableField(value = "salt")
    @ApiModelProperty(value="盐")
    private String salt;

    /**
     * 状态：0正常 1禁用
     */
    @TableField(value = "state")
    @ApiModelProperty(value="状态：0正常 1禁用")
    private Integer state;

    /**
     * 是否管理员0否 1是
     */
    @TableField(value = "is_admin")
    @ApiModelProperty(value="是否管理员0是 1否")
    private Integer isAdmin;

    /**
     * 创建时间
     */
    @TableField(value = "create_at")
    @ApiModelProperty(value="创建时间")
    private Date createAt;

    /**
     * 更新时间
     */
    @TableField(value = "update_at")
    @ApiModelProperty(value="更新时间")
    private Date updateAt;

    /**
     * 最新登陆时间
     */
    @TableField(value = "last_login_at")
    @ApiModelProperty(value="最新登陆时间")
    private Date lastLoginAt;

    @TableField(value = "tel_number")
    @ApiModelProperty(value="电话")
    private String telNumber;

}